﻿<UserControl x:Class="JIRAServices.JiraUserControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:workItemReportInterface="clr-namespace:ReportInterface;assembly=ReportInterface"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
  <UserControl.Resources>
    <DataTemplate DataType="{x:Type workItemReportInterface:IReport}" x:Key="ReportTemplate">
      <StackPanel Orientation="Horizontal" Margin="2">
        <TextBlock Text="{Binding Path=Description}" />
      </StackPanel>
    </DataTemplate>
  </UserControl.Resources>
  <StackPanel>
    <TextBlock Margin="10,10,10,0">Report template:</TextBlock>
    <ListBox Margin="10,10,10,0" Height="100" ItemsSource="{Binding Reports}" SelectedItem="{Binding SelectedReport}" ItemTemplate="{StaticResource ReportTemplate}"></ListBox>

    <StackPanel Orientation="Horizontal">
      <TextBlock Margin="10,10,10,0" Width="50">Url:</TextBlock>
      <TextBox Margin="10,10,10,0" Width="200" Text="{Binding ProjectUrl}"></TextBox>
    </StackPanel>

    <StackPanel Orientation="Horizontal">
      <TextBlock Margin="10,10,10,0" Width="50">Login:</TextBlock>
      <TextBox Margin="10,10,10,0" Width="75" Text="{Binding User}"></TextBox>
      <TextBox Margin="10,10,10,0" Width="75" Text="{Binding Password}"></TextBox>
    </StackPanel>

    <StackPanel Orientation="Horizontal">
      <TextBlock Margin="10,10,10,0" Width="50">Jql:</TextBlock>
      <TextBox Margin="10,10,10,0" Width="200" Text="{Binding Jql}"></TextBox>
    </StackPanel>

    <Button HorizontalAlignment="Left" Margin="10,10,10,0" Width="150" Click="LoadButtonClick">Connect</Button>
    
    
    <TextBlock Margin="10,10,10,0">Status:</TextBlock>
    <TextBlock Margin="10,10,10,0" Text="{Binding Status}"></TextBlock>
  </StackPanel>
</UserControl>
